Fully Qualified Name: | Laminas\Crypt\Symmetric\Mcrypt |
Implements: | SymmetricInterface |
Symmetric encryption using the Mcrypt extension
NOTE: DO NOT USE only this class to encrypt data. This class doesn't provide authentication and integrity check over the data. PLEASE USE Laminas\Crypt\BlockCipher instead!
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | Mcrypt |
decrypt() | Decrypt | Mcrypt |
encrypt() | Encrypt | Mcrypt |
getAlgorithm() | Get the encryption algorithm | Mcrypt |
getBlockSize() | Get the block size | Mcrypt |
getKey() | Get the encryption key | Mcrypt |
getKeySize() | Get the maximum key size for the selected cipher and mode of operation | Mcrypt |
getMode() | Get the cipher mode | Mcrypt |
getOriginalSalt() | Get the original salt value | Mcrypt |
getPadding() | Get the padding object | Mcrypt |
getPaddingPluginManager() | Returns the padding plugin manager. If it doesn't exist it's created. | Mcrypt |
getSalt() | Get the salt (IV) according to the size requested by the algorithm | Mcrypt |
getSaltSize() | Get the salt (IV) size | Mcrypt |
getSupportedAlgorithms() | Get the supported algorithms | Mcrypt |
getSupportedModes() | Get all supported encryption modes | Mcrypt |
setAlgorithm() | Set the encryption algorithm (cipher) | Mcrypt |
setKey() | Set the encryption key If the key is longer than maximum supported, it will be truncated by getKey(). | Mcrypt |
setMode() | Set the cipher mode | Mcrypt |
setOptions() | Set default options | Mcrypt |
setPadding() | Set the padding object | Mcrypt |
setPaddingPluginManager() | Set the padding plugin manager | Mcrypt |
setSalt() | Set the salt (IV) | Mcrypt |
Constructor
Parameter Name | Type | Description |
---|---|---|
$options | array|\Traversable |
Returns:
Decrypt
Parameter Name | Type | Description |
---|---|---|
$data | string |
Returns: string
Encrypt
Parameter Name | Type | Description |
---|---|---|
$data | string |
Returns: string
Get the encryption algorithm
Returns: string
Get the block size
Returns: int
Get the encryption key
Returns: string
Get the maximum key size for the selected cipher and mode of operation
Returns: int
Get the cipher mode
Returns: string
Get the original salt value
Returns: string
Get the padding object
Returns: \Padding\PaddingInterface
Returns the padding plugin manager. If it doesn't exist it's created.
Returns: \ContainerInterface
Get the salt (IV) according to the size requested by the algorithm
Returns: string
Get the salt (IV) size
Returns: int
Get the supported algorithms
Returns: array
Get all supported encryption modes
Returns: array
Set the encryption algorithm (cipher)
Parameter Name | Type | Description |
---|---|---|
$algo | string |
Returns: \Mcrypt Provides a fluent interface
Set the encryption key If the key is longer than maximum supported, it will be truncated by getKey().
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: \Mcrypt Provides a fluent interface
Set the cipher mode
Parameter Name | Type | Description |
---|---|---|
$mode | string |
Returns: \Mcrypt Provides a fluent interface
Set default options
Parameter Name | Type | Description |
---|---|---|
$options | array |
Returns: void
Set the padding object
Parameter Name | Type | Description |
---|---|---|
$padding | \Padding\PaddingInterface |
Returns: \Mcrypt Provides a fluent interface
Set the padding plugin manager
Parameter Name | Type | Description |
---|---|---|
$plugins | string|\ContainerInterface |
Returns: void
Set the salt (IV)
Parameter Name | Type | Description |
---|---|---|
$salt | string |
Returns: \Mcrypt Provides a fluent interface